package com.fqgj.sentry.controller.pc.request;

import com.fqgj.sentry.common.exception.BizException;
import com.fqgj.sentry.common.exception.enums.ErrorCodeEnums;
import com.fqgj.sentry.common.request.ParamsObject;

import java.util.List;

/**
 * Created by zwh @yuntu-inc.com
 *
 * @description
 * @create 2017/8/3 0003 下午 2:24
 */
public class UpdateColumnVo extends ParamsObject {
    /**
     * 字段id
     */
    private Long id;
    /**
     *事件ids
     */
    private List<Long> eventIds;
    /**
     * 显示名
     */
    private String displayName;
    /**
     * 1:日期 2:小数 3:整数 4:字符串
     */
    private Integer dataType;
    /**
     * 说明
     */
    private String info;

    private String moduleCode;

    public String getModuleCode() {
        return moduleCode;
    }

    public UpdateColumnVo setModuleCode(String moduleCode) {
        this.moduleCode = moduleCode;
        return this;
    }

    @Override
    public void validate() {
        if (id == null) {
            throw new BizException(ErrorCodeEnums.param_valid_error);
        }
    }

    public Long getId() {
        return id;
    }

    public UpdateColumnVo setId(Long id) {
        this.id = id;
        return this;
    }

    public List<Long> getEventIds() {
        return eventIds;
    }

    public UpdateColumnVo setEventIds(List<Long> eventIds) {
        this.eventIds = eventIds;
        return this;
    }

    public String getDisplayName() {
        return displayName;
    }

    public UpdateColumnVo setDisplayName(String displayName) {
        this.displayName = displayName;
        return this;
    }

    public Integer getDataType() {
        return dataType;
    }

    public UpdateColumnVo setDataType(Integer dataType) {
        this.dataType = dataType;
        return this;
    }


    public String getInfo() {
        return info;
    }

    public UpdateColumnVo setInfo(String info) {
        this.info = info;
        return this;
    }
}
